package com.iplay.service.notification.type.order;

import com.iplay.entity.order.OrderStatus.OrderStatusCategory;
import com.iplay.service.notification.core.AbstractMessageWithExtra;
import com.iplay.service.order.RoleInOrder;

public class OrderMessage extends AbstractMessageWithExtra {
	
	private static final String ORDER_ID = "orderId";
	
	private static final String ROLE_IN_ORDER = "role";
	
	private static final String ORDER_STATUS_CATEGORY = "orderStatus";

	public OrderMessage(int orderId, RoleInOrder role, OrderStatusCategory orderStatusCategory, String body) {
		super(body);
		super.extra.put(ORDER_ID, String.valueOf(orderId));
		super.extra.put(ROLE_IN_ORDER, role.toString());
		super.extra.put(ORDER_STATUS_CATEGORY, orderStatusCategory.toString());
	}
	
	public OrderMessage(int orderId, String body) {
		super(body);
		super.extra.put(ORDER_ID, String.valueOf(orderId));
	}
}
